package com.swz.dcrm.adpter;

import android.content.Context;

import com.swz.dcrm.R;
import com.swz.dcrm.base.ViewHolder;
import com.swz.dcrm.model.CarModel;


import java.util.List;

public class CarModelAdapter extends CustomAdapter<CarModel> {
    public CarModelAdapter(Context context,  List<CarModel> datas) {
        super(context, R.layout.item_car_model, datas);
    }

    @Override
    protected void convert(ViewHolder holder, CarModel carModel, int position) {
            holder.setText(R.id.tv_car_model,carModel.getName());
            holder.itemView.setOnClickListener(v -> {
                if(onClickListener!=null){
                    onClickListener.onItemClick(carModel);
                }
            });
    }
}
